package com.spring.factorybean;

import org.springframework.beans.factory.FactoryBean;

//@Component
public class FruitFactoryBean implements FactoryBean<Fruit>  {

	@Override
	public Fruit getObject() throws Exception {
		Fruit f = new Fruit();
		f.setName("苹果");
		return f ;
	}

	@Override
	public Class<?> getObjectType() {
		return Fruit.class;
	}

	 
	
}
